class Parent {
    title:string = "默认值";

    show(){
        console.log(this.title)
    }
}

// TS 语法中，class类名之后可以以关键字 extend 方式完成构造函数的继承关系
class Child extends Parent {
    info:string = "child的数据"
    print(){
        console.log(this.info);
    }
}
var p:Parent = new Parent();
var c:Child = new Child();
var c2:Parent = new Child();
var c3:Object = new Child();